home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / etc / init.d / rmnologin < prev    next >
Encoding:
Text File  |  2009-03-31  |  941 b   |  48 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          rmnologin
  4. # Required-Start:    $remote_fs $all
  5. # Required-Stop: 
  6. # Default-Start:     2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: Remove /etc/nologin at boot
  9. # Description:       This script removes the /etc/nologin file as the
  10. #                    last step in the boot process, if DELAYLOGIN=yes.
  11. #                    If DELAYLOGIN=no, /etc/nologin was not created by
  12. #                    bootmisc earlier in the boot process.
  13. ### END INIT INFO
  14.  
  15. PATH=/sbin:/bin
  16. [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
  17. . /lib/init/vars.sh
  18.  
  19. do_start () {
  20.     #
  21.     # If login delaying is enabled then remove the flag file
  22.     #
  23.     case "$DELAYLOGIN" in
  24.       Y*|y*)
  25.         rm -f /var/lib/initscripts/nologin
  26.         ;;
  27.     esac
  28. }
  29.  
  30. case "$1" in
  31.   start)
  32.     do_start
  33.     ;;
  34.   restart|reload|force-reload)
  35.     echo "Error: argument '$1' not supported" >&2
  36.     exit 3
  37.     ;;
  38.   stop)
  39.     # No-op
  40.     ;;
  41.   *)
  42.     echo "Usage: $0 start|stop" >&2
  43.     exit 3
  44.     ;;
  45. esac
  46.  
  47. :
  48.